package picobot.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * a class that is responsible for performing a step action
 */
public class StepAction implements ActionListener {

	PicobotUserInterface pui;

	/**
	 * the constructor for StepAction which takes a PicobotUserInterface
	 * 
	 * @param ui
	 *            is the PicobotUserInterface
	 */
	public StepAction(PicobotUserInterface ui) {
		pui = ui;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// if the action is performed, stepUpdate of the PicoPanel of the
		// PicobotUserInterface is called
		pui.getScreen().stepUpdate();
	}

}
